export default [
  // user
  {
    path: '/user',
    component: '../layouts/UserLayout',
    routes: [
      { path: '/user', redirect: '/user/login' },
      { path: '/user/login', component: './Login/Login' },
    ],
  },
  // app
  {
    path: '/',
    component: '../layouts/BasicLayout',
    Routes: ['src/pages/Authorized'],
    routes: [
      // dashboard
      { path: '/', redirect: '/dashboard/index' },
      {
        path: '/dashboard/index',
        name: 'dashboard',
        icon: 'dashboard',
        component: './Dashboard/Index',
        // authority: "003",
      },


      // 设备综合管理-------------------------------------
      {
        path: '/equipment',
        icon: 'laptop',
        name: 'equipment',
        authority: [10001,10021,10031],
        routes: [
          // 设备管理
          {
            path: '/equipment/device',
            name: 'device',
            authority: [10001],
            hideChildrenInMenu: true,
            routes:[
              { path: '/equipment/device', redirect: '/equipment/device/list' },
              {
                path: '/equipment/device/list',
                component: './Equipment/Index',
              },
              {
                path: '/equipment/device/:id',
                component: './Equipment/Detail',
                authority: [10003],
                routes: [
                  {
                    path: '/equipment/device/:id/info',
                    component: './Equipment/Components/DetailInfo',
                  },
                  {
                    path: '/equipment/device/:id/repairlog',
                    component: './Equipment/Components/Repairlog',
                  },
                  {
                    path: '/equipment/device/:id/maintenlog',
                    component: './Equipment/Components/Maintenlog',
                  },
                  {
                    path: '/equipment/device/:id/operationlog',
                    component: './Equipment/Components/Operationlog',
                  },
                ],
              },

            ]
          },


          // 备件管理
          {
            path: '/equipment/spares',
            name: 'spares',
            authority: [10021],
            routes:[
              { path: '/equipment/spares', redirect: '/equipment/spares/list' },
              {
                path: '/equipment/spares/list',
                component: './Spares/Index',
              },
              {
                path: '/equipment/spares/:id',
                component: './Spares/Detail',
                authority: [10023],
                // hideChildrenInMenu: true,
                routes: [
                  {
                    path: '/equipment/spares/:id/info',
                    component: './Spares/Components/DetailInfo',
                  },
                  {
                    path: '/equipment/spares/:id/related',
                    component: './Spares/Components/RelatedEquipment',
                  },
                  {
                    path: '/equipment/spares/:id/userecord',
                    component: './Spares/Components/UseRecords',
                  },
                  {
                    path: '/equipment/spares/:id/operationlog',
                    component: './Spares/Components/Operationlog',
                  },
                ],
              },
            ]
          },



          // 维保单位管理
          {
            path: '/equipment/maintenance',
            name: 'maintenance',
            authority: [10031],
            routes:[
              { path: '/equipment/maintenance', redirect: '/equipment/maintenance/list' },
              {
                path: '/equipment/maintenance/list',
                component: './Maintain/Index',
              },
              {
                path: '/equipment/maintenance/:id',
                component: './Maintain/Detail',
                authority: [10033],
                // hideChildrenInMenu: true,
              },
            ]
          },

        ],
      },


      // 能耗监控-------------------------------------
      {
        path: '/energy',
        icon: 'bulb',
        name: 'energy',
        authority: [10041,10051,10061],
        routes: [
          // 历史能耗查询
          {
            path: '/energy/history',
            name: 'history',
            authority: [10041],
            routes:[
              { path: '/energy/history', redirect: '/energy/history/list' },
              {
                path: '/energy/history/list',
                component: './Energy/EnergyList',
              },
            ]
          },
          // 控制记录查询
          {
            path: '/energy/controlrecord',
            name: 'controlrecord',
            authority: [10051],
            routes:[
              { path: '/energy/controlrecord', redirect: '/energy/controlrecord/list' },
              {
                path: '/energy/controlrecord/list',
                component: './Energy/ControlRecordList',
              },
            ]
          },
          // 防盗信息查询
          {
            path: '/energy/burglarproof',
            name: 'burglarproof',
            authority: [10061],
            routes:[
              { path: '/energy/burglarproof', redirect: '/energy/burglarproof/list' },
              {
                path: '/energy/burglarproof/list',
                component: './Energy/BurglarproofList',
              },
            ]
          },
        ],
      },


      // 告警管理-------------------------------------
      {
        path: '/alarm',
        icon: 'warning',
        name: 'alarm',
        authority: [10071,10081],
        routes: [
          // 当前告警
          {
            path: '/alarm/currentalarm',
            name: 'currentalarm',
            authority: [10071],
            routes:[
              { path: '/alarm/currentalarm', redirect: '/alarm/currentalarm/list' },
              {
                path: '/alarm/currentalarm/list',
                component: './Warn/Index',
              },
              {
                path: '/alarm/currentalarm/:id',
                component: './Warn/Detail',
                authority: [10073],
                hideChildrenInMenu: true,
              },
            ]
          },
          // 历史告警
          {
            path: '/alarm/historyalarm',
            name: 'historyalarm',
            authority: [10081],
            routes:[
              { path: '/alarm/historyalarm', redirect: '/alarm/historyalarm/list' },
              {
                path: '/alarm/historyalarm/list',
                component: './Warn/Index',
              },
              {
                path: '/alarm/historyalarm/:id',
                component: './Warn/Detail',
                authority: [10082],
                hideChildrenInMenu: true,
              },
            ]
          },
        ],
      },



      // 养护管理-------------------------------------
      {
        path: '/maintain',
        icon: 'environment-o',
        name: 'maintain',
        authority: [10091,10101,10111,10121,10131],
        routes: [
          // 养护监控
          {
            path: '/maintain/monitor',
            name: 'monitor',
            authority: [10091],
            component: './Monitor/Index',
          },

          // 路线管理
          {
            path: '/maintain/route',
            name: 'route',
            authority: [10101],
            routes:[
              { path: '/maintain/route', redirect: '/maintain/route/list' },
              {
                path: '/maintain/route/list',
                component: './Path/Index',
              },
              {
                path: '/maintain/route/:id',
                component: './Path/Detail',
                hideChildrenInMenu: true,
                routes: [
                  {
                    authority: [10104],
                    path: '/maintain/route/:id/info',
                    component: './Path/Components/DetailInfo',
                  },
                  {
                    authority: [10103],
                    path: '/maintain/route/:id/curing',
                    component: './Path/Components/Curing',
                  },
                ],
              },
            ]
          },


          // 计划管理
          {
            path: '/maintain/plan',
            name: 'plan',
            authority: [10111],
            routes:[
              { path: '/maintain/plan', redirect: '/maintain/plan/list' },
              {
                path: '/maintain/plan/list',
                component: './Plan/Index',
              },
              {
                path: '/maintain/plan/detail',
                component: './Plan/Detail',
                hideChildrenInMenu: true,
                routes: [
                  {
                    authority: [10112],
                    path: '/maintain/plan/detail/add',
                    component: './Plan/Components/PlanAdd',
                  },
                  {
                    authority: [10114],
                    path: '/maintain/plan/detail/edit/:id',
                    component: './Plan/Components/PlanAdd',
                  },
                  {
                    authority: [10113],
                    path: '/maintain/plan/detail/info/:id',
                    component: './Plan/Components/DetailInfo',
                  },
                ],
              },
            ]
          },


          // 任务管理
          {
            path: '/maintain/task',
            name: 'task',
            authority: [10121],
            routes:[
              { path: '/maintain/task', redirect: '/maintain/task/list' },
              {
                path: '/maintain/task/list',
                component: './Task/Index',
              },
              {
                path: '/maintain/task/detail',
                component: './Task/Detail',
                hideChildrenInMenu: true,
                routes: [
                  {
                    authority: [10122],
                    path: '/maintain/task/detail/add',
                    component: './Task/Components/TaskAdd',
                  },
                  {
                    authority: [10124],
                    path: '/maintain/task/detail/edit/:id',
                    component: './Task/Components/TaskAdd',
                  },
                  {
                    authority: [10123],
                    path: '/maintain/task/detail/info/:id',
                    component: './Task/Components/DetailInfo',
                  },
                ],
              },
            ]
          },


          // 历史任务记录
          {
            path: '/maintain/historyrecords',
            name: 'historyrecords',
            authority: [10131],
            routes:[
              { path: '/maintain/historyrecords', redirect: '/maintain/historyrecords/list' },
              {
                path: '/maintain/historyrecords/list',
                component: './Task/Index',
              },
              {
                path: '/maintain/historyrecords/detail',
                component: './Task/Detail',
                hideChildrenInMenu: true,
                routes: [
                  {
                    authority: [10132],
                    path: '/maintain/historyrecords/detail/info/:id',
                    component: './Task/Components/DetailInfo',
                  },
                ],
              },
            ]
          },

        ],
      },


      // 故障维修-------------------------------------
      {
        path: '/fault',
        icon: 'tool',
        name: 'fault',
        authority: [10141,10151],
        routes: [
          // 视频巡检
          {
            path: '/fault/video',
            name: 'video',
            authority: [10141],
            routes:[
              { path: '/fault/video', redirect: '/fault/video/list' },
              {
                path: '/fault/video/list',
                component: './VideoInspection/Index',
              },
              {
                path: '/fault/video/:id',
                component: './VideoInspection/Detail',
                hideChildrenInMenu: true,
                routes: [
                  // {
                  //   authority: [10142],
                  //   path: '/fault/video/detail/add',
                  //   component: './VideoInspection/Components/RepairAdd',
                  // },
                  // {
                  //   authority: [10144],
                  //   path: '/fault/video/:id/edit',
                  //   component: './VideoInspection/Components/RepairAdd',
                  // },
                  {
                    authority: [10143],
                    path: '/fault/video/:id/info',
                    component: './VideoInspection/Components/DetailInfo',
                  },
                ],
              },
            ]
          },
          // 当前维修
          {
            path: '/fault/current',
            name: 'current',
            authority: [10141],
            routes:[
              { path: '/fault/current', redirect: '/fault/current/list' },
              {
                path: '/fault/current/list',
                component: './Repair/Index',
              },
              {
                path: '/fault/current/:id',
                component: './Repair/Detail',
                hideChildrenInMenu: true,
                routes: [
                  {
                    authority: [10142],
                    path: '/fault/current/detail/add',
                    component: './Repair/Components/RepairAdd',
                  },
                  {
                    authority: [10144],
                    path: '/fault/current/:id/edit',
                    component: './Repair/Components/RepairAdd',
                  },
                  {
                    authority: [10143],
                    path: '/fault/current/:id/info',
                    component: './Repair/Components/DetailInfo',
                  },
                  {
                    authority: [10143],
                    path: '/fault/current/:id/handle',
                    component: './Repair/Components/HandleInfo',
                  },
                ],
              },
            ]
          },

          // 历史维修
          {
            path: '/fault/history',
            name: 'history',
            authority: [10151],
            routes:[
              { path: '/fault/history', redirect: '/fault/history/list' },
              {
                path: '/fault/history/list',
                component: './Repair/Index',
              },
              {
                path: '/fault/history/:id',
                component: './Repair/Detail',
                hideChildrenInMenu: true,
                routes: [
                  {
                    authority: [10152],
                    path: '/fault/history/:id/info',
                    component: './Repair/Components/DetailInfo',
                  },
                  {
                    authority: [10152],
                    path: '/fault/history/:id/handle',
                    component: './Repair/Components/HandleInfo',
                  },
                ],
              },
            ]
          },


        ],
      },


      // 统计分析-------------------------------------
      {
        path: '/statistical',
        icon: 'bar-chart',
        name: 'statistical',
        authority: [10161,10171,10181,10191,10201],
        routes: [
          { path: '/statistical', redirect: '/statistical/districtanalysis' },
          // 区域点位统计
          {
            path: '/statistical/districtanalysis',
            name: 'districtanalysis',
            authority: [10161],
            component: './Statistical/DistrictAnalysis',
          },
          // 故障类型统计
          {
            path: '/statistical/faultanalysis',
            name: 'faultanalysis',
            authority: [10171],
            component: './Statistical/FaultAnalysis',
          },
          // 故障修复情况
          {
            path: '/statistical/repairanalysis',
            name: 'repairanalysis',
            authority: [10181],
            component: './Statistical/RepairAnalysis',
          },
          // 超时修复情况
          {
            path: '/statistical/overtimeanalysis',
            name: 'overtimeanalysis',
            authority: [10101],
            component: './Statistical/OvertimeAnalysis',
          },
          // 点位养护统计
          {
            path: '/statistical/maintainanalysis',
            name: 'maintainanalysis',
            authority: [10201],
            component: './Statistical/MaintainAnalysis',
          },
        ],
      },



      // 评价考核-------------------------------------
      // {
      //   path: '/assessment',
      //   icon: 'like-o',
      //   name: 'assessment',
      //   hideChildrenInMenu: true,
      //   routes: [
      //     { path: '/assessment', redirect: '/assessment/personnelkpi' },
      //     // 人员考核
      //     {
      //       path: '/assessment/personnelkpi',
      //       name: 'personnelkpi',
      //       // component: './Statistical/Index',
      //     },
      //     // 维保单位考核
      //     {
      //       path: '/assessment/companykpi',
      //       name: 'companykpi',
      //       // component: './Statistical/Index',
      //     },
      //   ],
      // },



      // 稽查督导-------------------------------------
      {
        path: '/inspection',
        icon: 'team',
        name: 'inspection',
        authority: [10251],
        hideChildrenInMenu: true,
        routes: [
          // 稽查督导
          { path: '/inspection', redirect: '/inspection/supervise/list' },
          {
            path: '/inspection/supervise',
            name: 'supervise',
            routes:[
              { path: '/inspection/supervise', redirect: '/inspection/supervise/list' },
              {
                path: '/inspection/supervise/list',
                component: './Inspection/Index',
              },
              {
                path: '/inspection/supervise/:id',
                component: './Inspection/Detail',
                routes: [
                  {
                    authority: [10252],
                    path: '/inspection/supervise/:id/add',
                    component: './Inspection/Components/InspectionAdd',
                  },
                  {
                    authority: [10254],
                    path: '/inspection/supervise/:id/edit',
                    component: './Inspection/Components/InspectionAdd',
                  },
                  {
                    authority: [10253],
                    path: '/inspection/supervise/:id/info',
                    component: './Inspection/Components/HandleInfo',
                  },
                ],
              },
            ]
          },



        ],
      },


      // 知识库-------------------------------------
      {
        path: '/repository',
        icon: 'file-word',
        name: 'repository',
        authority: [10261,10271,10281,10291,10301,10311],
        routes: [
          { path: '/repository', redirect: '/repository/1' },
          // 标准规范
          {
            path: '/repository/1',
            name: 'type1',
            authority: [10261],
            component: './Repository/Index',
          },
          // 规章制度
          {
            path: '/repository/2',
            name: 'type2',
            authority: [10271],
            component: './Repository/Index',
          },
          // 计划文档
          {
            path: '/repository/3',
            name: 'type3',
            authority: [10281],
            component: './Repository/Index',
          },
          // 报告文档
          {
            path: '/repository/4',
            name: 'type4',
            authority: [10291],
            component: './Repository/Index',
          },
          // 草案文档
          {
            path: '/repository/5',
            name: 'type5',
            authority: [10301],
            component: './Repository/Index',
          },
          // 其他文档
          {
            path: '/repository/6',
            name: 'type6',
            authority: [10311],
            component: './Repository/Index',
          },
        ],
      },


      // 公告通知-------------------------------------
      {
        path: '/notice',
        icon: 'notification',
        name: 'notice',
        authority: [10321,10331],
        routes: [
          // 公告
          {
            path: '/notice/announce',
            name: 'announce',
            authority: [10321],
            routes:[
              { path: '/notice/announce', redirect: '/notice/announce/list' },
              {
                path: '/notice/announce/list',
                component: './Notice/Index',
              },
              {
                path: '/notice/announce/:id',
                component: './Notice/Detail',
                hideChildrenInMenu: true,
                routes: [
                  {
                    authority: [10322],
                    path: '/notice/announce/detail/add',
                    component: './Notice/Components/NoticeAdd',
                  },
                  {
                    authority: [10323],
                    path: '/notice/announce/:id/edit',
                    component: './Notice/Components/NoticeAdd',
                  },
                  {
                    authority: [10324],
                    path: '/notice/announce/:id/info',
                    component: './Notice/Components/DetailInfo',
                  },
                ],
              },
            ]
          },
          // 通知
          {
            path: '/notice/notify',
            name: 'notify',
            authority: [10331],
            routes:[
              { path: '/notice/notify', redirect: '/notice/notify/list' },
              {
                path: '/notice/notify/list',
                component: './Notice/Index',
              },
              {
                path: '/notice/notify/:id',
                component: './Notice/Detail',
                hideChildrenInMenu: true,
                routes: [
                  {
                    authority: [10332],
                    path: '/notice/notify/detail/add',
                    component: './Notice/Components/NoticeAdd',
                  },
                  {
                    authority: [10333],
                    path: '/notice/notify/:id/edit',
                    component: './Notice/Components/NoticeAdd',
                  },
                  {
                    authority: [10334],
                    path: '/notice/notify/:id/info',
                    component: './Notice/Components/DetailInfo',
                  },
                ],
              },
            ]
          },


        ],
      },


      // 系统设置-------------------------------------
      {
        path: '/system',
        icon: 'setting',
        name: 'system',
        authority: [10341,10351,10361,10371,10381,10391,10400],
        routes: [
          // 区域管理
          {
            path: '/system/district',
            name: 'district',
            authority: [10341],
            routes:[
              { path: '/system/district', redirect: '/system/district/list' },
              {
                path: '/system/district/list',
                component: './District/Index',
              },
              {
                path: '/system/district/:id',
                component: './District/Detail',
                hideChildrenInMenu: true,
                routes: [
                  {
                    authority: [10342],
                    path: '/system/district/detail/add',
                    component: './District/Components/DistrictAdd',
                  },
                  {
                    authority: [10343],
                    path: '/system/district/:id/edit',
                    component: './District/Components/DistrictAdd',
                  },
                ],
              },
            ]
          },


          // 点位管理
          {
            path: '/system/point',
            name: 'point',
            authority: [10351],
            routes:[
              { path: '/system/point', redirect: '/system/point/list' },
              {
                path: '/system/point/list',
                component: './Point/Index',
              },
              {
                authority: [10353],
                path: '/system/point/:id',
                component: './Point/Detail',
                routes: [
                  {
                    path: '/system/point/:id/info',
                    component: './Point/Components/DetailInfo',
                  },
                  {
                    path: '/system/point/:id/deviceInfo',
                    component: './Point/Components/DeviceInfo',
                  }
                ]
                // hideChildrenInMenu: true,
              },
            ]
          },


          // 用户管理
          {
            path: '/system/users',
            name: 'users',
            authority: [10361],
            routes:[
              { path: '/system/users', redirect: '/system/users/list' },
              {
                path: '/system/users/list',
                component: './UserManage/Index',
              },
              {
                path: '/system/users/:id',
                component: './UserManage/Detail',
                hideChildrenInMenu: true,
                routes: [
                  {
                    authority: [10362],
                    path: '/system/users/detail/add',
                    component: './UserManage/Components/UserAdd',
                  },
                  {
                    authority: [10363],
                    path: '/system/users/:id/edit',
                    component: './UserManage/Components/UserAdd',
                  },
                ],
              },
            ]
          },


          // 角色权限管理
          {
            path: '/system/role',
            name: 'role',
            authority: [10371],
            routes:[
              { path: '/system/role', redirect: '/system/role/list' },
              {
                path: '/system/role/list',
                component: './Role/Index',
              },
              {
                path: '/system/role/:id',
                component: './Role/Detail',
                hideChildrenInMenu: true,
                routes: [
                  {
                    authority: [10372],
                    path: '/system/role/detail/add',
                    component: './Role/Components/RoleAdd',
                  },
                  {
                    authority: [10373],
                    path: '/system/role/:id/edit',
                    component: './Role/Components/RoleAdd',
                  },
                ],
              },
            ]
          },


          // 部门管理
          {
            path: '/system/department',
            name: 'department',
            authority: [10381],
            routes:[
              { path: '/system/department', redirect: '/system/department/list' },
              {
                path: '/system/department/list',
                component: './Department/Index',
              },
              {
                path: '/system/department/:id',
                component: './Department/Detail',
                hideChildrenInMenu: true,
                routes: [
                  {
                    authority: [10382],
                    path: '/system/department/detail/add',
                    component: './Department/Components/DepartmentAdd',
                  },
                  {
                    authority: [10383],
                    path: '/system/department/:id/edit',
                    component: './Department/Components/DepartmentAdd',
                  },
                ],
              },
            ]
          },

          // App版本管理
          {
            path: '/system/appversion',
            name: 'appversion',
            authority: [10400],
            routes:[
              { path: '/system/appversion', redirect: '/system/appversion/list' },
              {
                path: '/system/appversion/list',
                component: './AppVersion/Index',
              },
              {
                path: '/system/appversion/:id',
                component: './AppVersion/Detail',
                hideChildrenInMenu: true,
                routes: [
                  {
                    path: '/system/appversion/detail/add',
                    component: './AppVersion/Components/AppVersionAdd',
                  },
                  {
                    path: '/system/appversion/:id/edit',
                    component: './AppVersion/Components/AppVersionAdd',
                  },
                ],
              },
            ]
          },

          // 系统日志
          {
            path: '/system/log',
            name: 'log',
            authority: [10391],
            routes:[
              { path: '/system/log', redirect: '/system/log/list' },
              {
                path: '/system/log/list',
                component: './SystemLog/Index',
              },
            ]
          },


        ],
      },




      // 个人用户信息修改-------------------------------------
      {
        path: '/personal',
        name: 'personal',
        hideInMenu: true,
        routes: [
          {
            path: '/personal/setting',
            component: './Personal/Setting',
          },
          {
            path: '/personal/modifypsw',
            component: './Personal/ModifyPsw',
          },
        ],
      },

      {
        path: '/403',
        component: './Exception/403',
      },

      {
        component: '404',
      },
    ],
  },
];



